package cate.common.table.guild.task;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.d.GDObj;
import easy.java.dev.note.NoteField;
import org.apache.commons.lang3.StringUtils;

public class GuildTaskRow extends ERow {
    @NoteField(value = "品质")
    public int quality;

    @NoteField(value = "奖励")
    public String rewardCfg;

    @NoteField(value = "奖励内政经验")
    public int exp;

    @NoteField(value = "所需时间")
    public long time;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("任务ID",1);
        this.quality = xr.getInteger("品质", 0);
        this.rewardCfg = xr.getString("奖励","");
        this.exp = xr.getInteger("奖励内政经验", 0);
        this.time = xr.getLong("所需时间", 0L);
    }

    /** 所需时间（毫秒） */
    public long timeRequired;

    @Override
    public void decode() {

        if (time > 0) {
            timeRequired = time * 1000;
        }
    }
}
